package ReadWriteFieldsRelations;

import java.lang.reflect.Method;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.*;
import java.lang.*;
import  java.io.*;

	public class ReadWriteMethods {
	  

//	  final Map<Class, Method> readMethods = new LinkedHashMap<Class, Method>();
	//  final Map<Class, Method> writeMethods = new LinkedHashMap<Class, Method>();
		final Map writeMethods = new HashMap();
		final Map readMethods = new HashMap();
		final Map callMethods = new HashMap();
	  void read(String className, String methodName) {
			if (readMethods.get(className) == null)
				readMethods.put(className, new LinkedList());
			List readMethodList = (List) readMethods.get(className);
			if(!readMethodList.contains(methodName))
				readMethodList.add(methodName);
	  }
	  

	  
	  void write(String className, String methodName) {
			if (writeMethods.get(className) == null)
				writeMethods.put(className, new LinkedList());
			List writeMethodList = (List) writeMethods.get(className);
			if(!writeMethodList.contains(methodName))
				writeMethodList.add(methodName);
	  }

	  
	  Map getReadMethods(){
		  return this.readMethods;
	  }
	  Map getWriteMethods(){
		  return this.writeMethods;
	  }
	  Map getcallMethods(){
		  return this.callMethods;
	  }
	  		  	  

	}
